package com.mm.cloud.lease.dto.housing.form;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import java.io.Serial;
import java.io.Serializable;

/**
 * 房源新增DTO
 */
@Data
public class SaveHousingDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 城市id
     */
    @NotNull(message = "城市id不能为空")
    private Long cityId;

    /**
     * 区域id
     */
    @NotNull(message = "区域id不能为空")
    private Long areaId;

    /**
     * 店面id
     */
    @NotNull(message = "店面id不能为空")
    private Long storeId;

    /**
     * 分组id
     */
    @NotNull(message = "分组id不能为空")
    private Long groupId;

    /**
     * 房源类型
     */
    @NotNull(message = "房源类型不能为空")
    private Long housingTypeId;

    /**
     * 房源编号
     */
    @NotBlank(message = "房源编号不能为空")
    private String housingCode;

    /**
     * 物业地址id
     */
    @NotNull(message = "物业地址id不能为空")
    private Long propertyAddressId;

    /**
     * 座栋
     */
    private String building;

    /**
     * 单元
     */
    private String unitName;

    /**
     * 是否有电梯 1-有 2-无
     */
    @NotNull(message = "是否有电梯不能为空")
    @Range(min = 1, max = 2, message = "是否有电梯范围错误")
    private Byte isLift;

    /**
     * 总楼层数量
     */
    private Integer totalFloor;

    /**
     * 租赁类型 1-自持 2-租赁
     */
    @NotNull(message = "租赁类型不能为空")
    @Range(min = 1, max = 2, message = "租赁类型范围错误")
    private Integer leaseType;

}
